1. Field of the Invention
The present invention relates to a motor drive device for controlling the driving of a stepping motor, and to an electronic device that uses the motor drive device.
2. Description of Related Art
Excitation methods (excitation modes) for stepping motors include the W1-2-phase excitation method, the 1-2-phase excitation method, the 2-phase excitation method, and other methods. The W1-2-phase excitation method is an excitation method whereby the rotation angle per step can be controlled more finely than the basic step angle by controlling the excitation current that flows to the motor coil, and is referred to as a “micro-step drive method.” The rotation angle per step in the W1-2-phase excitation method is ½ the rotation angle per step produced by the 1-2-phase excitation method, and ¼ the rotation angle per step produced by the 2-phase excitation method. The 2-phase excitation method, 1-2-phase excitation method, and W1-2-phase excitation method are therefore also referred to as the “full-step drive method,” the “half-step drive method,” and the “quarter-step drive method,” respectively.
In a case in which a stepping motor is driven by the W1-2-phase excitation method, the types (input method) of control signals inputted to a controller (current chopper circuit) for controlling the excitation current are classified broadly into two types, the so-called “clock input method” and “parallel input method.”
In the case of the clock input method, four types of control signals (a clock signal CLK, a rotation direction switching signal CWCCW, and excitation method switching signals MODE0/MODE1 (hereinafter referred to as the excitation method switching signal MODE as appropriate)), for example, are inputted to the controller. The clock signal CLK is a control signal that is driven in pulses at a predetermined frequency, and the controller causes the stepping motor to rotate by a predetermined step angle (rotation angle per step) at each rise (or fall) of the clock signal CLK pulse. The rotation direction switching signal CWCCW is a control signal for indicating whether to drive the stepping motor in the positive rotation direction (clockwise: CW) or the negative rotation direction (counterclockwise: CCW). The excitation method switching signal MODE is a control signal for indicating the excitation method of the stepping motor.
The excitation method switching signal MODE and rotation direction switching signal CWCCW described above correspond to control signals for indicating the rotation angle (i.e., the per-step rotation angle (=step angle)) of the stepping motor per unit time, and the clock signal CLK corresponds to a control signal for indicating the units of time (drive period of the stepping motor). However, the rotation direction switching signal CWCCW is not an essential control signal in cases in which switching of the rotation direction is not controlled.
In a case in which the parallel input method is followed, six types of control signals (a first polarity signal PH1, a second polarity signal PH2, first current amount signals I01/I11, and second current amount signals I02, I12), for example, are inputted to the controller. The first polarity signal PH1 is a control signal for indicating the polarity of a first excitation current that flows to the motor coil in a first excitation phase, and the second polarity signal PH2 is a control signal for indicating the polarity of a second excitation current that flows to the motor coil in a second excitation phase. The first current amount signals I01/I11 are control signals for indicating the amount of the first excitation current, and the second current amount signals I02/I12 are control signals for indicating the amount of the second excitation current. Specifically, the polarity and amount (level) of the first excitation current are determined by the combination of the first polarity signal PH1 and the first current amount signal I01/I11, and the polarity and amount (level) of the second excitation current are determined by the combination of the second polarity signal PH2 and the second current amount signals I02/I12.
Japanese Laid-open Patent Publication No. 2008-29146 (hereinafter referred to as Patent Document 1) by the present applicant can be cited as an example of a conventional technique that relates to the above description. Patent Document 1 discloses a motor drive device provided with a signal generator for generating a parallel-input-method control signal DVS from a clock-input-method control signal INS.
The conventional structure of the abovementioned signal generator will be described. FIG. 25 is a block diagram showing an example of the conventional signal generator. As shown in FIG. 25, the conventionally configured signal generator is composed of a counter unit X10 and a decoder unit X20.
The counter unit X10 is a means for counting the number of pulses of the clock signal CLK and outputting the count value as a 4-bit output signal Q (and inverted output signal QB; the same hereinafter) to the decoder unit X20, and is composed of a decoder X11 and a shift register X12. Clock-input-method control signals INS inputted to the counter unit X10 include the clock signal CLK as well as the rotation direction switching signal CWCCW and an enable signal ENABLE.
The decoder X11 determines a stored value of the shift register X12 in accordance with the output signal Q inputted as feedback from the shift register X12, and in accordance with the rotation direction switching signal CWCCW inputted from the outside. For example, when the rotation direction switching signal CWCCW is at a logical level for specifying positive rotation of the motor, the decoder X11 increments the then-current value of the output signal Q once and stores the value in the shift register X12 (“0” is stored when the current value of the output signal Q is “15”), and when the rotation direction switching signal CWCCW is at a logical level for specifying negative rotation of the motor, the decoder X11 decrements the then-current value of the output signal Q once and stores the value in the shift register X12 (“15” is stored when the current value of the output signal Q is “0”). The shift register X12 outputs the stored value thereof as the output signal Q at each rise (or fall) of the clock signal CLK.
The decoder unit X20 is a means for generating parallel-input-method control signals DVS (first polarity signal PH1, second polarity signal PH2, first current amount signals I01/I11, and second current amount signals I02/I12) on the basis of the output signal Q inputted from the counter unit X10 and the excitation method switching signals MODE0/MODE1 inputted from the outside, and is composed of a decoder X21 and a selector X22. Clock-input-method control signals INS inputted to the decoder unit X20 include the excitation method switching signals MODE0/MODE1 as well as the enable signal ENABLE.
The decoder X21 includes a decoder X211 for full-step driving, a decoder X212 for half-step driving, and a decoder X213 for quarter-step driving, and these decoders generate parallel-input-method control signals DF, DH, DQ, respectively, in accordance with the output signal Q. Based on the excitation method switching signal MODE, the selector X22 selects any one of the control signals DF, DH, DQ inputted from the decoder X21 and outputs the selected signal as the control signal DVS to a controller of a subsequent stage (not shown in FIG. 25).
FIGS. 26A, 26B, and 26C are torque vector diagrams for the full-step drive method, the half-step drive method, and the quarter-step drive method, respectively. The numbers associated with the arrows in each diagram indicate the output signal Q (number of pulses of the clock signal CLK) of the counter unit X10. As is apparent from these diagrams, the step angles of the motor in the full-step drive method, the half-step drive method, and the quarter-step drive method are 90°, 45°, and 22.5°, respectively, in terms of electrical angle.
However, in the signal generator of the conventional configuration shown in FIG. 25, the counter unit X10 has only one decoder X11 for counting the number of pulses of the clock signal CLK, the decoder unit X20 has only one decoder X211, decoder X212, and decoder X213 for each of full-step driving, half-step driving, and quarter-step driving, respectively, as decoders X21 corresponding to the output signal Q of the counter unit X10, and no provision is made with regard to the rotation angle (positive rotation/negative rotation) of the motor.
Therefore, in the motor drive device provided with a signal generator in accordance with the conventional configuration described above, the correlation between the output signal Q (number of pulses of the clock signal CLK) of the counter unit X10 and the phase (excitation point) of the torque vector is fundamentally inconsistent between the different excitation methods, as is apparent by comparing FIGS. 26A, 26B, and 26C, and when the excitation method is switched during driving of the motor, the torque vector of the motor is transitioned to an unintended phase, which can cause problems with the stepping operation of the motor.
FIG. 27 is a torque vector diagram showing the problems that occur during switching of the excitation method. For example, in a state in which the motor is step-driven in the positive rotation direction by the full-step drive method, and the output signal Q of the counter unit X10 is “8,” the phase of the torque vector turns 180° in terms of electrical angle as shown in the drawing in a case in which the excitation method of the motor is switched to the quarter-step drive method. When the torque vector of the motor has such a large transition to an unintended phase, the smooth rotation of the motor is adversely affected by missteps, and vibration due to hunting, motor stoppage due to power swing, and other problems can occur.
When the excitation method of the motor is switched to the full-step drive method in a state in which the motor is step-driven in the positive rotation direction by the quarter-step drive method, and the output signal Q of the counter unit X10 is “14,” since the phase of the torque vector turns −135° in terms of electrical angle (compare FIGS. 26A and 26C), negative rotation of the motor can occur during switching of the excitation method.